package org.yawnage.framework.server 
{
	import org.yawnage.framework.server.Publisher;
	import org.yawnage.interfaces.framework.IPublisher;
	import org.yawnage.interfaces.framework.ISubscriber;
	 /**
	  * <p>//TODO:To be written</p>
	  * @author Berry Jordaan
	  * @date 2011/09/14 05:29 PM
	  * @copyright  Copyright © Berry/James 2011
	  * @version 1.0.0.0 
	  * @description
	  * @history Berry Jordaan on 2011/09/14 05:29 PM: Created
	  */
	public class BrokerPublisher extends Publisher implements IPublisher,ISubscriber
	{
		
		//************** Publisher Name *****
		public static const PUBLISHER_NAME :String = "PUBLISHER_BrokerPublisher";
		
		//************** Enums **************
		public static const SERVICE_READY	:String = "ready";
		//************** Public *************
		
		//************** Private ************
		
		//************** protected **********
		
		/**
		 * Constructor
		 */
		public function BrokerPublisher()
		{
			super(PUBLISHER_NAME);
			setClassDescription("org.yawnage.framework.server.BrokerPublisher");
		}
		
		/**
		 * Define your services here. These services are your contract with the broker.
		 * registerService(this, MY_STATIC_CLASS.SERVICENAME);
		 */
		override public function defineServices():void
		{
			//TODO: Add services
			registerService(this, SERVICE_READY);
			defineSubscriptions();
		}
		
		/**
		 * Subscriptions are optional.
		 * You cna subscribe to another publisher as follows:
		 * Example:
		 * <p>
		 * 	Diplomat.subscribe(this, myCallback, "publisherName", "serviceName");
		 * </p>
		 */
		protected function defineSubscriptions():void
		{
			//subscription are optional
		}
		
		/**
		 * useless comment here!
		 */
		override public function dispose():void 
		{
			super.dispose();
		}
		
	}
}